#!/usr/bin/env python3

import os

# Path to ffconf.h file
ffconf_path = 'G:\\Espressif\\frameworks\\esp-idf-v5.5.1\\components\\fatfs\\src\\ffconf.h'

def view_ffconf():
    print(f"Viewing {ffconf_path}...")
    
    # Check if file exists
    if not os.path.exists(ffconf_path):
        print(f"File not found: {ffconf_path}")
        return False
    
    # Read file content
    with open(ffconf_path, 'r') as f:
        content = f.read()
    
    # Print only the configuration defines
    print("\nFATFS Configuration:")
    lines = content.split('\n')
    for line in lines:
        if line.strip().startswith('#define'):
            print(line.strip())
    
    return True

if __name__ == "__main__":
    view_ffconf()
